from django.conf.urls import re_path
from rest_framework.routers import SimpleRouter
from . import views

urlpatterns = [
    re_path(r'^channels/$',views.GetChannelsView.as_view()),
    re_path(r'^article/(?P<pk>\d+)/$',views.DetailedArticleView.as_view({"get":"retrieve"})),
]

router = SimpleRouter()

router.register('article',views.ArticleChannelView,basename='channel')

router.register('article',views.CollectArticleView,basename='collect')
router.register('articles/search', views.ArticleSearchViewSet, base_name='article_search')

urlpatterns += router.urls